home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / Zoo6.Dxr / 00007.ls < prev    next >
Encoding:
Text File  |  1997-11-18  |  1.6 KB  |  62 lines

  1. on mouseDown
  2.   global activeSprite, homeV, homeH, snap1, snap2, RcurrentWeight, LcurrentWeight, stickH1List, stickH2List, stickV1List, stickV2List, homeHList, stickh1, stickh2, stickv1, stickv2, offRight, offLeft, tempcount
  3.   set activeSprite to the clickOn
  4.   set offLeft to 0
  5.   set offRight to 0
  6.   set snap1 to 0
  7.   set snap2 to 0
  8.   set tempR to RcurrentWeight - LcurrentWeight + 5
  9.   if tempR > 9 then
  10.     set tempR to 9
  11.   end if
  12.   if tempR < 1 then
  13.     set tempR to 1
  14.   end if
  15.   set good to 0
  16.   set G to 3
  17.   repeat while not good
  18.     set stickh1 to getAt(stickH1List, G)
  19.     set used to 0
  20.     repeat with f = 14 to 17
  21.       if the locH of sprite f = stickh1 then
  22.         set used to 1
  23.       end if
  24.     end repeat
  25.     set G to G + 1
  26.     if not used then
  27.       set good to 1
  28.     end if
  29.   end repeat
  30.   set good to 0
  31.   set G to 3
  32.   repeat while not good
  33.     set stickh2 to getAt(stickH2List, G)
  34.     set used to 0
  35.     repeat with f = 14 to 17
  36.       if the locH of sprite f = stickh2 then
  37.         set used to 1
  38.       end if
  39.     end repeat
  40.     set G to G + 1
  41.     if not used then
  42.       set good to 1
  43.     end if
  44.   end repeat
  45.   set stickv1 to getAt(stickV1List, tempR)
  46.   set stickv2 to getAt(stickV2List, tempR)
  47.   set homeH to getAt(homeHList, activeSprite - 13)
  48.   set homeV to 416
  49.   if the locV of sprite activeSprite <> homeV then
  50.     if the locH of sprite activeSprite > 170 then
  51.       set offRight to 1
  52.       set stickv2 to the locV of sprite activeSprite
  53.       set stickh2 to the locH of sprite activeSprite
  54.     else
  55.       set offLeft to 1
  56.       set stickv1 to the locV of sprite activeSprite
  57.       set stickh1 to the locH of sprite activeSprite
  58.     end if
  59.   end if
  60.   go("num")
  61. end
  62.